Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.10 Input Objects - clarify lists are permitted as Input fields #1068

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

msolomon
Copy link

@msolomon msolomon commented Dec 8, 2023

A minor omission in 3.10 Input Objects confused me briefly today by suggesting lists might not be permitted as the type of an input field. However, they are (and are even used in the examples), so add it in.

Alternatively, the kinds of permitted fields could be described explicitly as they are under Field Arguments: https://spec.graphql.org/draft/#sel-GAHZjCZABABDukZ

I believe this is simply an editing mistake.

A minor omission in 3.10 Input Objects confused me briefly today by suggesting lists might not be permitted as the type of an input field. However, they are (and are even used in the examples), so add it in.

Alternatively, the kinds of permitted fields could be described explicitly as they are under Field Arguments: https://spec.graphql.org/draft/#sel-GAHZjCZABABDukZ
Copy link

netlify bot commented Dec 8, 2023

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 934e72e
🔍 Latest deploy log https://app.netlify.com/sites/graphql-spec-draft/deploys/657357b63a587e0008060ed8
😎 Deploy Preview https://deploy-preview-1068--graphql-spec-draft.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

linux-foundation-easycla bot commented Dec 8, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find! Since "list" is actually a wrapping type, and you can't have a "list of unions" here, we should be more specific. I've made an alternative suggestion:

spec/Section 3 -- Type System.md Outdated Show resolved Hide resolved
Accept Benjie's suggestion

Co-authored-by: Benjie <[email protected]>
@msolomon msolomon requested a review from benjie December 8, 2023 21:03
Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! @graphql/tsc another +1 and we'll merge 👍

@benjie benjie added the ✏️ Editorial PR is non-normative or does not influence implementation label Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Editorial PR is non-normative or does not influence implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants